package thread;

public class threadDemo10 {
    public static void main(String[] args) throws InterruptedException {
        /*Thread t=new mythread7();
        t.start();
        Thread.sleep(2000);*/

        //System.out.println(t.getId()+" "+t.getName());
        Thread t=new Thread(()->{
            Thread t1=Thread.currentThread();
            System.out.println(t1.getId());
        });
        t.start();

    }
}
class mythread7 extends Thread{
    @Override
    public void run(){
        System.out.println(this.getId()+" "+this.getName());
    }
}
